<?php
class MailUtility
{
    public static function send($to, $subject, $view, $params)
    {
        $message = new YiiMailMessage();
        $message->setFrom(CONST_MAIL_FROM_ADDRESS, CONST_MAIL_FROM_NAME);
        $message->addTo($to);
        $message->setSubject($subject);
        $message->view = $view;
        $message->setBody($params, 'text/html');
        Yii::app()->mail->send($message);
    }
}